package com.vogue.supplymall.order.domain.biz;

import com.vogue.supplymall.common.domain.dto.EditCartInfo;
import com.vogue.supplymall.common.domain.dto.OrderInfo;
import com.vogue.supplymall.common.domain.dto.UserInfo;

import java.util.List;
import java.util.Map;

/**
 * The interface Cart biz.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-01-10
 */
public interface CartBiz {

    /**
     * Find cart map.
     * 查询购物车
     *
     * @param editCartInfo the edit cart info
     * @param info         the info
     * @return the map
     */
    Map<String, Object> findCart(EditCartInfo editCartInfo,UserInfo info);

    /**
     * Find cart count map.
     * 查询购物车数量
     *
     * @param editCartInfo the edit cart info
     * @return the map
     */
    Map<String, Object> findCartCount(EditCartInfo editCartInfo);

    /**
     * Add cart.
     * 添加购物车
     *
     * @param editCartInfo the edit cart info
     * @param info         the info
     */
    void addCart(EditCartInfo editCartInfo, UserInfo info);

    /**
     * Update cart.
     *
     * @param editCartInfo the edit cart info
     */
    void updateCart(EditCartInfo editCartInfo);

    /**
     * 批量更新购物车
     *
     * @param editCartInfo the edit cart info
     */
    void updateCartList(List<EditCartInfo> editCartInfo);

    /**
     * Remove cart.
     *
     * @param editCartInfo the edit cart info
     */
    void removeCart(EditCartInfo editCartInfo);

    /**
     * Cart move watch.
     * 移入关注
     *
     * @param editCartInfo the edit cart info
     * @param info         the info
     */
    void cartMoveWatch(EditCartInfo editCartInfo, UserInfo info);

    /**
     * Again add cart.
     *
     * @param orderInfo the order info
     * @param userInfo  the user info
     */
    void againAddCart(OrderInfo orderInfo, UserInfo userInfo);
}
